<?php
include 'admin-functions.php';
$drafts = parse_ini_file($drafts_db) or
	die "Cannot parse drafts db";
	
if (isset($_POST['title']) && isset($_POST['content'])) {
	add_post($_POST['title'], $_POST['content'], $date, $author, $db);
//	$drafts_array = parse_ini_file($drafts_db);
//	$drafts_array[(count($drafts_array)+1)]['title'] = $_POST['title'];
//	$drafts_array[(count($drafts_array)+1)]['content'] = $_POST['content'];	
//	array_write($drafts_array, $drafts_db);
}

else {
	echo "This file has been parsed through the server\n\n";
	include $drafts_db;
}
?>